<div class="text-center chose-btn">
  <div class="ui-radio" [class.ui-radioed]="modifiedType == 'basic'" (click)="modifiedType = 'basic'"><i
    class="iconfont icon-iconfontradiobox"></i><span>基本设置</span>
    <input type="radio" name="" value="">
  </div>
  <div class="ui-radio" [class.ui-radioed]="modifiedType == 'testing'" (click)="modifiedType = 'testing'"><i
    class="iconfont icon-iconfontradiobox"></i><span>测试人员设置</span>
    <input type="radio" name="" value="">
  </div>
  <div class="ui-radio" [class.ui-radioed]="modifiedType == 'other'" (click)="modifiedType = 'other'"><i
    class="iconfont icon-iconfontradiobox"></i><span>功能扩展</span>
    <input type="radio" name="" value="">
  </div>
</div>


<div *ngIf="modifiedType === 'basic'">
  <div class="form-group clearfix">
    <label class="col-md-2">AppID</label>
    <div class="col-md-10">
      <input type="text" class="form-control" name="AppID" value="{{AppID}}" disabled>
    </div>
  </div>
  <div class="form-group clearfix">
    <label class="col-md-2">小程序名称</label>
    <div class="col-md-10">
      <input type="text" class="form-control" name="appletName" value="{{appletName}}" disabled>
    </div>
  </div>
  <div class="form-group clearfix">
    <label class="col-md-2">支付商户号</label>
    <div class="col-md-10">
      <input type="text" class="form-control" name="mch_id" [(ngModel)]="mch_id">
    </div>
  </div>
  <div class="form-group clearfix">
    <label class="col-md-2">支付key</label>
    <div class="col-md-10">
      <input type="text" class="form-control" name="pay_key" [(ngModel)]="pay_key">
    </div>
  </div>
  <div class="form-group clearfix">
    <label class="col-md-2">证书</label>
    <div class="col-md-10">
      <textarea class="form-control" style="resize: none" cols="5" rows="5" name="apiclient_cert" [(ngModel)]="apiclient_cert"></textarea>
    </div>
  </div>
  <div class="form-group clearfix">
    <label class="col-md-2">证书密钥</label>
    <div class="col-md-10">
      <textarea class="form-control" style="resize: none" cols="5" rows="5" name="apiclient_key" [(ngModel)]="apiclient_key"></textarea>
    </div>
  </div>
  <div class="text-center">
    <button class="btn btn-default" (click)="bindPaySubmit()">保存</button>
  </div>
</div>
<div *ngIf="modifiedType === 'testing'">
  <button class="btn btn-default" (click)="addTesterModal.show()">新增测试用户</button>
  <table class="table release-table">
    <thead>
    <tr>
      <th>id</th>
      <th>微信号</th>
      <th>添加时间</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let item of userList">
      <td>{{item.id}}</td>
      <td>{{item.wechatid}}</td>
      <td>{{item.created_at}}</td>
      <td><a href="javascript:;" (click)="unbindTester(item.wechatid)">解除</a></td>
    </tr>
    </tbody>
  </table>
</div>
<div *ngIf="modifiedType === 'other'">
  <div class="form-group clearfix">
    <label class="col-md-2">卡券开通状态</label>
    <div class="col-md-10">
      <div class="ui-radio" [class.ui-radioed]="!!coupons_key" (click)="applyKey()"><i
        class="iconfont icon-iconfontradiobox"></i><span>正常</span>
        <input type="radio" name="" value="">
      </div>
      <div class="ui-radio" [class.ui-radioed]="!coupons_key" (click)="closeCoupon()"><i
        class="iconfont icon-iconfontradiobox"></i><span>停止</span>
        <input type="radio" name="" value="">
      </div>
    </div>
  </div>
  <div class="form-group clearfix">
    <label class="col-md-2">推客开通状态</label>
    <div class="col-md-10">
      <div class="ui-radio" [class.ui-radioed]="!!tuike" (click)="applyTuike()"><i
        class="iconfont icon-iconfontradiobox"></i><span>正常</span>
        <input type="radio" name="" value="">
      </div>
      <div class="ui-radio" [class.ui-radioed]="!tuike" (click)="closeTuike()"><i
        class="iconfont icon-iconfontradiobox"></i><span>停止</span>
        <input type="radio" name="" value="">
      </div>
    </div>
  </div>
</div>

<!-- 新增测试用户 -->
<div bsModal #addTesterModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
     aria-labelledby="mySmallModalLabel"
     aria-hidden="true" [config]="{backdrop: 'static'}">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title pull-left">新增测试用户</h4>
        <button type="button" class="close pull-right" aria-label="Close" (click)="addTesterModal.hide()">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form #addTesterForm="ngForm">
          <div class="form-group">
            <label class="col-md-3"><span class="c-red">*</span>微信号</label>
            <div class="col-md-7">
              <input type="text" class="form-control" name="wechatid" [(ngModel)]="wechatid" required>
            </div>
          </div>
        </form>
      </div>
      <div class="model-footer mb10 text-center">
        <button type="submit" class="btn btn-default" (click)="addTesterModal.hide()">取 消</button>
        <button type="button" class="btn btn-success" [disabled]="!addTesterForm.form.valid" (click)="addTester()">确 定
        </button>
      </div>
    </div>
  </div>
</div>

<app-notification [type]="type" [message]="message" [isShow]="isShow"
                  (promptIsShow)="isShow = $event;"></app-notification>
